package com.ruoyi.source.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.db.mapper.SourceDataAddupMapper;
import com.ruoyi.db.domain.SourceDataAddup;
import com.ruoyi.source.service.ISourceDataAddupService;
import com.ruoyi.common.core.text.Convert;

/**
 * 统计表Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-05-26
 */
@Service
@DataSource(DataSourceType.SLAVE)
public class SourceDataAddupServiceImpl implements ISourceDataAddupService 
{
    @Autowired
    private SourceDataAddupMapper sourceDataAddupMapper;

    /**
     * 查询统计表
     * 
     * @param id 统计表主键
     * @return 统计表
     */
    @Override
    public SourceDataAddup selectSourceDataAddupById(Long id)
    {
        return sourceDataAddupMapper.selectSourceDataAddupById(id);
    }

    /**
     * 查询统计表列表
     * 
     * @param sourceDataAddup 统计表
     * @return 统计表
     */
    @Override
    public List<SourceDataAddup> selectSourceDataAddupList(SourceDataAddup sourceDataAddup)
    {
        return sourceDataAddupMapper.selectSourceDataAddupList(sourceDataAddup);
    }

    /**
     * 查询统计表列表
     *
     * @param sourceDataAddup 统计表
     * @return 统计表
     */
    @Override
    public List<Map<String, Object>> selectSourceDataAddupListMap(SourceDataAddup sourceDataAddup)
    {
        return sourceDataAddupMapper.selectSourceDataAddupListMap(sourceDataAddup);
    }

    /**
     * 新增统计表
     * 
     * @param sourceDataAddup 统计表
     * @return 结果
     */
    @Override
    public int insertSourceDataAddup(SourceDataAddup sourceDataAddup)
    {
        return sourceDataAddupMapper.insertSourceDataAddup(sourceDataAddup);
    }

    /**
     * 修改统计表
     * 
     * @param sourceDataAddup 统计表
     * @return 结果
     */
    @Override
    public int updateSourceDataAddup(SourceDataAddup sourceDataAddup)
    {
        return sourceDataAddupMapper.updateSourceDataAddup(sourceDataAddup);
    }

    /**
     * 批量删除统计表
     * 
     * @param ids 需要删除的统计表主键
     * @return 结果
     */
    @Override
    public int deleteSourceDataAddupByIds(String ids)
    {
        return sourceDataAddupMapper.deleteSourceDataAddupByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除统计表信息
     * 
     * @param id 统计表主键
     * @return 结果
     */
    @Override
    public int deleteSourceDataAddupById(Long id)
    {
        return sourceDataAddupMapper.deleteSourceDataAddupById(id);
    }
}
